package org.szrcb.temu.SalesManage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.szrcb.temu.SalesManage.dao.UserInfoDao;
import org.szrcb.temu.SalesManage.pojo.UserInfo;
import org.szrcb.temu.SalesManage.service.UserInfoService;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired
    private UserInfoDao userInfoDao;

    @Override
    public int countUserInfo(String userId) {
        return userInfoDao.countUserInfo(userId);
    }

    @Override
    public void insertUserInfo(UserInfo user) {
        userInfoDao.insertUserInfo(user);
    }

    @Override
    public void updateUserInfo(UserInfo user) {
        userInfoDao.updateUserInfo(user);
    }

    @Override
    public String queryUserId(String accessToken) {
        return userInfoDao.queryUserId(accessToken);
    }

    @Override
    public String queryUserCookie(String accessToken) {
        return userInfoDao.queryUserCookie(accessToken);
    }

    @Override
    public int countUserTokenInfo(String userId) {
        return userInfoDao.countUserTokenInfo(userId);
    }

    @Override
    public void updateUserToken(String userId, String cookie, String token) {
        userInfoDao.updateUserToken(userId,cookie,token);
    }

    @Override
    public void insertUserToken(String userId, String cookie, String token) {
        userInfoDao.insertUserToken(userId,cookie,token);
    }

    @Override
    public String queryAccessToken(String userId, String cookie) {
        return userInfoDao.queryAccessToken(userId,cookie);
    }
}
